home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 8 / The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO / prg_gen / convr611.zip / BRUCEINI.DOC < prev    next >
Text File  |  1996-09-04  |  8KB  |  194 lines

  1. BRUCEINI.DOC                         1                         Revised: 09-04-96
  2.  
  3. This text file describes what INI files are and how they are supported  by  this
  4. program and other programs by the same author.  INI files  are  always  optional
  5. but they can be very useful.
  6.  
  7. An INI file is a way of specifying parameters for a program that you don't  want
  8. to have to respecify from the command  line  each  time.   This  allows  you  to
  9. override the program defaults automatically.
  10.  
  11. This is very useful if you disagree with the defaults I've established  for  the
  12. routines.  It is also useful in cases where you typically use  the  command  one
  13. way but in fairly regular cases you need to run the command using a whole  bunch
  14. of different parameters.  You can set up one INI file for  your  standard  usage
  15. and then provide a different INI file when it's time  to  run  the  lesser  used
  16. versions.
  17.  
  18. Each of the programs reads an INI file if it can find one.  By default, the  INI
  19. file that is searched for is based on the executable's name but not always. This
  20. is shown below (block declarations and  environmental  variables  are  described
  21. later):
  22.  
  23.         Routine         INI file        Block           Env variable
  24.  
  25.         AV.EXE          AV.INI          [AV]            AV
  26.         BFIND.EXE       BFIND.INI       [BFIND]         BFIND
  27.         CHANGE.EXE      CHANGE.INI      [CHANGE]        CHANGE
  28.         CONVERT.EXE     CONVERT.INI     [CONVERT]       CONVERT
  29.         COPSINCE.EXE    COPSINCE.INI    [COPSINCE]      COPSINCE
  30.         DATES.EXE       DATES.INI       [DATES]         DATES
  31.         DIRCOMP.EXE     DIRCOMP.INI     [DIRCOMP]       DIRCOMP
  32.         DIRTOTAL.EXE    DIRTOTAL.INI    [DIRTOTAL]      DIRTOTAL
  33.         EUMAIL.EXE      EUMAIL.INI      [EUMAIL]        EUMAIL
  34.         FILL.EXE        FILL.INI        [FILL]          FILL
  35.         FILUPDAT.EXE    FILUPDAT.INI    [FILUPDAT]      FILUPDAT
  36.         FIXTEXT.EXE     FIXTEXT.INI     [FIXTEXT]       FIXTEXT
  37.         FORTUNE.EXE     FORTUNE.INI     [FORTUNE]       FORTUNE
  38.         HTMSTRIP.EXE    HTMSTRIP.INI    [HTMSTRIP]      HTMSTRIP
  39.         ISAMFIND.EXE &
  40.           ISAMMAKE.EXE  ISAMFIND.INI    [ISAMFIND]      ISAMFIND
  41.         MOZ.EXE         MOZ.INI         [MOZ]           MOZ
  42.         PAGINATE.EXE    PAGINATE.INI    [PAGINATE]      PAGINATE
  43.         READ.EXE &
  44.           READINIT.EXE &
  45.           READMAKE.EXE &
  46.           READY.EXE     READ.INI        [READ]          READ
  47.         TXTABLE.EXE     TXTABLE.INI     [TXTABLE]       TXTABLE
  48.  
  49. The INI file is an ASCII text file that can be created maintained by hand.   The
  50. commands in the INI file should begin in column 1.  It can consist of:
  51.  
  52.   (a) Command-line parameters
  53.   (b) Comments
  54.   (c) Block declarations
  55.   (d) Special items (vary by routine)
  56.  
  57.  
  58. BRUCEINI.DOC                         2                         Revised: 09-04-96
  59.  
  60. (a)  Command-line parameters:  The INI file can consist or one or  more  command
  61.      line parameters.  In  most  cases,  it  can  *only*  include  command  line
  62.      parameters that begin with a slash ("/").  These will vary  by  routine  of
  63.      course but, in READ for example, your INI file might appear like this:
  64.  
  65.         /MONO
  66.         /-DOS
  67.         /COLOR=123 134 145 156
  68.  
  69. (b)  Comments: The INI file can also contain comment lines.  These  are  defined
  70.      as any lines that  are  either  blank  or  contain  any  of  the  following
  71.      characters in column 1:
  72.  
  73.         (space) (any line that is indented is a comment)
  74.         ;       (semi-colon)
  75.         :       (colon)
  76.         '       (quote)
  77.  
  78. (c)  Block declarations:  You can combine INI files if you'd like.   This  saves
  79.      some disk space.  Typically, this  is  done  in  connection  with  the  SET
  80.      BG=inifile environmental parameter (described below).  Blocks are  declared
  81.      by using the name of searched-for routine  in  brackets.   (See  the  table
  82.      above to  see  what  blocks  are  searched  for  for  each  routine.)   Any
  83.      statements between one block and the next are assumed to be associated with
  84.      the first routine.  For example:
  85.  
  86.         ; ALL.INI -- contains all of the INI statements
  87.         [DATES]
  88.         /SORT
  89.         [FILL]
  90.         /ON
  91.         /SPLIT
  92.         [READ]
  93.         /MONO
  94.  
  95. (d)  Special items:  Some routines allow the INI file to include statements that
  96.      cannot be specified from the command line.  These  special  statements  are
  97.      described in the specific routine's documentation.
  98.  
  99.  
  100. BRUCEINI.DOC                         3                         Revised: 09-04-96
  101.  
  102. Where does each program look for the INI file?
  103.  
  104. Each program here looks for an INI file unless instructed otherwise.  The  logic
  105. used is as follows.  Note that the first "hit" wins:
  106.  
  107. (a)  No INI file is checked for if any of the following is true:
  108.       - /-I or /INULL is passed in from the command line
  109.       - /-I or /INULL is passed in from the routine's environmental parameter
  110.            (e.g. SET READ=/-I)
  111.       - the environmental variable BG is set to the value of /-I or /INULL
  112.            (e.g. SET BG=/-I)
  113.      Most programs accept either  /-I  or  /INULL.   However,  several  routines
  114.      (BFIND and CHANGE) accept /-I to mean do a  case-insensitive  search.   For
  115.      these programs, you *have* to use /INULL instead.
  116.  
  117. (b)  If a /Iinitfile setting is passed in, the routine uses  this  to  determine
  118.      the name of the INI file to look for.  Note that the file name must include
  119.      a period (e.g. "/ICHANGE.INI") or the program will skip it.
  120.  
  121. (c)  The routine looks for an environmental variable BG.  If  this  variable  is
  122.      defined (and it's not set to /-I), then the routine takes this  to  be  the
  123.      name of the INI file to look for.
  124.  
  125. (d)  The routine looks for the INI file under the "INI file" name shown  in  the
  126.      table at the start of this documentation.
  127.  
  128. If the INI file name does not include  either  a  drive  or  path  specification
  129. (e.g., you don't pass in something like /IC:\ALL.INI), the routine  will  search
  130. for the named file.  It will check  for  it  in  the  following  places  in  the
  131. following order.  The first place that it finds it wins:
  132.  
  133.   - Your default subdirectory (where you were when you executed the command)
  134.   - The subdirectory that contains the EXE that you're executing
  135.   - Your regular DOS path
  136.  
  137. If you do not have an INI file, this searching can take awhile especially if you
  138. have any networked drives in your path.  In this  case,  specifying  "/-I"  will
  139. save some time.  Passing in a fully qualified filename also helps.
  140.  
  141.  
  142. BRUCEINI.DOC                         4                         Revised: 09-04-96
  143.  
  144. Personally, I have a common INI file named WAYNE.INI in the root of my C: drive.
  145. I put it there so I don't run out of environmental space by specifying some huge
  146. path.  I have the following statement in my AUTOEXEC.BAT:
  147.  
  148.      SET BG=C:\WAYNE.INI
  149.  
  150. Currently, my C:\WAYNE.INI file looks like this:
  151.  
  152.      [AV]
  153.      /on
  154.      [bfind]
  155.      /-empty
  156.      [COPSINCE]
  157.      /def text=*.bas *.bi *.c *.diz *.doc *.h *.ref *.sas *.sc *.txt
  158.      /def prg=*.bas *.bat *.bi *.c *.h *.sas
  159.      /to c:\temp
  160.      /replace
  161.      /-beep
  162.      /text
  163.      /copy -0
  164.      [DATES]
  165.      /cc:\mine\datemine.txt
  166.      /sort
  167.      /day
  168.      /-i
  169.      [FILL]
  170.      /letter
  171.      [htmstrip]
  172.      /lc:\vbdos\htmstrip.ini
  173.      /-symbols
  174.      /warnings
  175.      [paginate]
  176.      /overwrite
  177.      /cc:\bat\brucedoc.ctl
  178.      [txtable]
  179.      /debug
  180.  
  181. If I ever need to override the WAYNE.INI settings, it's easy to  do  by  passing
  182. them in from the command line or by specifying /-I from the command line.
  183.  
  184.  
  185.                 Bruce Guthrie
  186.                 Wayne Software
  187.                 113 Sheffield St.
  188.                 Silver Spring, MD 20910
  189.  
  190.                 fax: (301) 588-8986
  191.                 e-mail: bguthrie@nmaa.org
  192.                 http://hjs.geol.uib.no/guthrie/
  193. 
  194.